]> permondes.de Git - Analog_Engine.git/blame - scripts/TP1 06.18 Mass in Tube.AESL
Application Gravity
[Analog_Engine.git] / scripts / TP1 06.18 Mass in Tube.AESL
CommitLineData
1820e06b
P
1IDENTIFICATION DIVISION
2PROGRAM-ID MassInTube
3VERSION 20240214
4COMMENT A thin tube rotates at a constant angular velocity perpendicular to gravity
5COMMENT A mass point moves frictionless in this tube. The differential equation gives the position of this mass point.
6COMMENT r''=omega^2*r -g*sin(omega*t+phi0)
7
8ENVIRONMENT DIVISION
9ENGINE Anabrid-THAT
10TIMEBASE 1ms
11REQUIRES COEFFICIENT 8, INTEGRATOR 4, INVERTER 1, MULTIPLIER 2
12
13DATA DIVISION
14OUTPUT OUTPUT.X x
15OUTPUT OUTPUT.Y y
16COEFFICIENT.1 ICw'
17COEFFICIENT.2 ICw
18COEFFICIENT.3 OMEGAC
19COEFFICIENT.4 OMEGAS # same as OMEGAC
20COEFFICIENT.5 G
21COEFFICIENT.6 R0 # r(0)
22COEFFICIENT.7 V0 # r'(0)
23COEFFICIENT.8 OMEGA^2 # = OMEGAC*OMEGAS
24
25PROGRAM DIVISION
26### Generating sin(omega*t+phi0) ###
27+1 -> COEFFICIENT.ICw’ -> icw’
28-1 -> COEFFICIENT.ICw -> -icw
29w’’, IC:icw’ -> INTEGRATOR -> -w’=-cos
30-w' -> COEFFICIENT.OMEGAC -> -omega*w'
31-omega*w', IC:-icw -> INTEGRATOR -> w=sin
32w -> INVERTER -> -w=-sin
33-w -> COEFFICIENT.OMEGAS -> -omega^2*w=w’’
34
35### the actual problem ###
36-sin -> COEFFICIENT.G -> -g*sin
37-1 -> COEFFICIENT.R0 -> -r0
38+1 -> COEFFICIENT.V0 -> v0
39omega^2*r, -g*sin,IC:v0 -> INTEGRATOR -> -r' # input is r''
40-r',IC:-r0 -> INTEGRATOR -> r
41r -> COEFFICIENT.OMEGA^2 -> omega^2*r
42
43### Converting r, phi to x,y coordinates for display ###
44r, sin -> MULTIPLIER -> x
45r, -cos -> MULTIPLIER -> y # y-axis shall go down according to gravity, thus negativ input
46
47OPERATION DIVISION
48MODE REPEAT
49OP-TIME 17,5ms